<table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide">
	<tr>
		<td>
			<span style="float: left;">后台管理中心&nbsp;&raquo;&nbsp;启动广告</span>
			<span style="float: right;">
			    <a href="./?controller=advertising&action=add&machine_type=<?php echo $this->machine_type;?>">+ 添加</a>
				<a href="javascript:history.go(-1);">&lt;- 返回</a>
			</span>
		</td>
	</tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
	<tr class="header">
		<td colspan="8">启动广告</td>
	</tr>
	<tr class="category" align="center">
		<td width="10%">ID</td>
		<td width="10%">广告类型</td>
		<td width="30%">广告地址</td>
		<td width="10%">尺寸</td>
		<td width="10%">停留时间</td>
		<td width="10%">能否主动关闭广告</td>
		<td width="10%">添加时间</td>
		<td width="10%">操作</td>
	</tr>
<?php
foreach ($this->data as $row)
{
    $type = $row['type'] == 1 ? '图片' : '视频';
    $closeflag = $row['closeflag'] == 1 ? '能' : '不能';
	echo <<<EOF
	<tr>
		<td class="altbg1" align="center">{$row['id']}</td>
		<td class="altbg2" align="center">{$type}</td>
		<td class="altbg1" align="center">{$row['openurl']}</td>
		<td class="altbg2" align="center">{$row['contentsize']}</td>
		<td class="altbg1" align="center">{$row['duration']}</td>
		<td class="altbg2" align="center">{$closeflag}</td>
		<td class="altbg1" align="center">{$row['createdate']}</td>
		<td class="altbg2" align="center">
		    <a href="./?controller=advertising&action=add&id={$row['id']}&machine_type={$row['machine_type']}">编辑</a><br />
		    <a href="./?controller=advertising&action=delete&id={$row['id']}&machine_type={$row['machine_type']}">删除</a>
		</td>
	</tr>
EOF;
}
?>
	<tr class="category">
		<td align="center" colspan="8">
			<?php echo $this->paging; ?>
		</td>
	</tr>
</table>
